Skip to content

Commit

Permalink
Merge pull request #213 from apigee/211-appgroups
Browse files Browse the repository at this point in the history
feat: appgroups and appgroup apps
  • Loading branch information
ssvaidyanathan authored Sep 11, 2024
2 parents 44ea86f + 89f5599 commit a35f28b
Show file tree
Hide file tree
Showing 12 changed files with 1,433 additions and 8 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mvn install -Ptest -Dapigee.config.options=create
You can also work with an individual config type using the
corresponding goal directly. The goals available are,
keyvaluemaps #v2.4.0 supports entries
keyvaluemaps #v2.4.0 or later supports entries
targetservers
resourcefiles
flowhooks
Expand All @@ -85,15 +85,23 @@ mvn install -Ptest -Dapigee.config.options=create
references
keystores
aliases
importKeys #v2.1.3 or later
apicategories #v2.6.0 or later
apidocs #v2.6.0 or later
importKeys #v2.1.3 or later
apicategories #v2.6.0 or later
apidocs #v2.6.0 or later
appgroups #v2.9.0 or later
appgroupapps #v2.9.0 or later
importAppGroupAppKeys #v2.9.0 or later
exportAppGroupAppKeys #v2.9.0 or later
For example, the apps goal is used below to only create apps and ignore all other config types.
mvn apigee-config:apps -Ptest -Dapigee.config.options=create
To export the dev app keys, use the following:
mvn apigee-config:exportAppKeys -Ptest -Dapigee.config.exportDir=./target
To export the app group app keys, use the following:
mvn apigee-config:exportAppGroupAppKeys -Ptest -Dapigee.config.exportDir=./target
```
The default "none" action is a NO-OP and it helps deploy APIs (using [apigee-deploy-maven-plugin](https://github.com/apigee/apigee-deploy-maven-plugin)) without affecting config.

Expand Down Expand Up @@ -138,7 +146,7 @@ To run the plugin and use the multi-file config format jump to samples project `

Refer to [samples/APIandConfig/HelloWorld](./samples/APIandConfig/HelloWorld) for config management along with API deployment using [apigee-deploy-maven-plugin](https://github.com/apigee/apigee-deploy-maven-plugin). More info at [samples/README.md](./samples/README.md)

### Update Developer App and Company App (from v2.1.2 onwards)
### Update Developer App, Group App and Company App (from v2.9.0 onwards)

When `apigee.config.options=update` is run on apps and if the payload passed includes the apiProducts, the Management server created a new credentials. To avoid this you can pass `-Dapigee.app.ignoreAPIProducts=true`. Please note this is applicable only for `apigee.config.options=update`. For more info on this, check [this](https://github.com/apigee/apigee-config-maven-plugin/issues/128) discussion.

Expand Down Expand Up @@ -180,6 +188,8 @@ The apigee.config.dir option must be used to identify the top most directory con
│ │ └── references.json
└── org
├── apiProducts.json
├── appGroups.json
├── appGroupApps.json
├── developerApps.json
├── developers.json
├── kvms.json
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.apigee.edge.config</groupId>
<artifactId>apigee-config-maven-plugin</artifactId>
<version>2.8.2-SNAPSHOT</version>
<version>2.9.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>apigee-config-maven-plugin</name>
<description>Plugin to manage configuration in Apigee</description>
Expand Down
51 changes: 51 additions & 0 deletions samples/APIandConfig/HelloWorld/edge.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,45 @@
]
}
],
"appGroups":[
{
"name":"appGroup1",
"channelUri":"marketplace",
"channelId":"owner",
"displayName":"App Group 1",
"status":"active",
"attributes":[
{
"name":"access",
"value":"public"
}
]
},
{
"name":"appGroup2",
"channelUri":"marketplace",
"channelId":"owner",
"displayName":"App Group 2",
"status":"active",
"attributes":[
{
"name":"access",
"value":"public"
}
]
}
],
"appGroupApps":{
"appGroup1":[
{
"apiProducts":[
"weatherProduct"
],
"callbackUrl":"http://weatherapp.com",
"name":"appGroupApp1"
}
]
},
"kvms":[
{
"name":"user_account_status",
Expand Down Expand Up @@ -312,6 +351,18 @@
"consumerSecret":"xyz123"
}
]
},
"importAppGroupAppKeys":{
"appGroup1":[
{
"apiProducts":[
"EchoProduct"
],
"name":"coolechoapp",
"consumerKey":"abcd",
"consumerSecret":"xyz123"
}
]
}
}
}
16 changes: 15 additions & 1 deletion samples/APIandConfig/shared-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<plugin>
<groupId>com.apigee.edge.config</groupId>
<artifactId>apigee-config-maven-plugin</artifactId>
<version>2.8.1</version>
<version>2.9.0</version>
<executions>
<execution>
<id>create-config-targetserver</id>
Expand Down Expand Up @@ -134,6 +134,20 @@
<goal>apps</goal>
</goals>
</execution>
<execution>
<id>create-config-appgroups</id>
<phase>install</phase>
<goals>
<goal>appgroups</goal>
</goals>
</execution>
<execution>
<id>create-config-appgroupapps</id>
<phase>install</phase>
<goals>
<goal>appgroupapps</goal>
</goals>
</execution>
<execution>
<id>create-config-reports</id>
<phase>install</phase>
Expand Down
11 changes: 11 additions & 0 deletions samples/EdgeConfig/resources/edge/org/appGroupApps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"appGroup1": [
{
"apiProducts": [
"weatherProduct"
],
"callbackUrl": "http://weatherapp.com",
"name": "appGroupApp1"
}
]
}
28 changes: 28 additions & 0 deletions samples/EdgeConfig/resources/edge/org/appGroups.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"name":"appGroup1",
"channelUri":"marketplace",
"channelId":"owner",
"displayName":"App Group 1",
"status":"active",
"attributes":[
{
"name":"access",
"value":"public"
}
]
},
{
"name":"appGroup2",
"channelUri":"marketplace",
"channelId":"owner",
"displayName":"App Group 2",
"status":"active",
"attributes":[
{
"name":"access",
"value":"public"
}
]
}
]
12 changes: 12 additions & 0 deletions samples/EdgeConfig/resources/edge/org/importAppGroupAppKeys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"appGroup1":[
{
"apiProducts":[
"weatherProduct"
],
"name":"appGroupApp1",
"consumerKey":"abcd",
"consumerSecret":"xyz"
}
]
}
16 changes: 15 additions & 1 deletion samples/EdgeConfig/shared-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<plugin>
<groupId>com.apigee.edge.config</groupId>
<artifactId>apigee-config-maven-plugin</artifactId>
<version>2.8.1</version>
<version>2.9.0</version>
<executions>
<execution>
<id>create-config-targetserver</id>
Expand Down Expand Up @@ -91,6 +91,20 @@
<goal>apps</goal>
</goals>
</execution>
<execution>
<id>create-config-appgroups</id>
<phase>install</phase>
<goals>
<goal>appgroups</goal>
</goals>
</execution>
<execution>
<id>create-config-appgroupapps</id>
<phase>install</phase>
<goals>
<goal>appgroupapps</goal>
</goals>
</execution>
<execution>
<id>create-config-reports</id>
<phase>install</phase>
Expand Down
Loading

0 comments on commit a35f28b

Please sign in to comment.