3scale / 3scale_toolbox

3scale toolbox
Apache License 2.0
37 stars 73 forks source link

Manage Mapping Rules from commands #355

Open r-lam opened 2 years ago

r-lam commented 2 years ago

The toolbox can update proxy related configuration but, limited to proxy endpoint on API, it can't access proxy mapping rules endpoints since there's no command for it.

My use case is a client requirement for translate this process to CI/CD environment with scripts and is getting complex to do with API requests only.

I've already take hands on it: fork the project and start the journey with ruby. So far, manage to code list, create subcommands like:

#3scale mapping-rules list [opts] <remote> <service>
3scale -k mapping-rules create remote 2 --metric-id=6 --http-method=GET --pattern=/api 
3scale -k mapping-rules list remote 2

Any ideas or if this is useful or not?

eguzki commented 2 years ago

I think it might be useful.

JFYI, there are "indirect" ways to manage mapping rules. I can think about two ways: