I hereby claim:
- I am chamilad on github.
- I am chamilad (https://keybase.io/chamilad) on keybase.
- I have a public key whose fingerprint is 513A 5B38 48E5 5AE1 F32C 70D4 472C C780 0BD9 E991
To claim this, I am signing this object:
filebeat.inputs: | |
- type: container | |
paths: | |
- /var/log/containers/*.log | |
processors: | |
- add_kubernetes_metadata: | |
in_cluster: true | |
processors: | |
- add_cloud_metadata: | |
- add_host_metadata: |
I hereby claim:
To claim this, I am signing this object:
filebeat.prospectors: | |
- input_type: log | |
paths: | |
- /mnt/wso2am-2.6.0/repository/logs/*.log | |
output.logstash: | |
hosts: ["logstash.private.deployment.local:5044"] |
# 1. Get list of APIs from env1 | |
print "Getting the list of APIs from ENV1..." | |
all_apis_in_env1 = api_utils.get_all_apis(env1_apimgt_url, env1_access_token, verify_ssl) | |
#... | |
#... | |
#... | |
# 2. Iterate through APIs and check if exists in env2 | |
print "Checking for API status in ENV2..." |
# If there is no matching API, an API create request is done. | |
# If a matching API is there, but no matching version, a version would be added | |
# If both a matching API with a matching version exists, the API would not be created. | |
for api_request in request_json_content["apis"]: | |
api_name_exists, api_id = api_utils.api_name_exists(api_request["name"], apimgt_url, access_token, | |
verify_ssl) | |
if api_name_exists: | |
# Check if the same version exists | |
api_version_exists, _ = api_utils.api_version_exists(api_request["name"], api_request["version"], |
for api_request_file in glob.glob("api_definitions/*_apis.json"): | |
request_json_content = json.loads(open(api_request_file).read()) | |
requesting_user = request_json_content["username"] | |
print "Parsing create requests for [user] %s [department] %s [requests] %s..." % ( | |
requesting_user, request_json_content["department"], len(request_json_content["apis"])) |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"properties": { | |
"username": { | |
"type": "string" | |
}, | |
"department": { | |
"type": "string" | |
}, |
{ | |
"username": "Username of the user", | |
"department": "Department of the user", | |
"apis": [ | |
{ | |
"name": "SampleAPI_dev1", | |
"description": "Sample API description", | |
"context": "/api/dev1/sample", | |
"version": "v1" | |
} |
#!/bin/bash | |
# loop, read last line for the input values | |
while read line; do | |
# read values from the line delimitted by `|` | |
consumer_key=$(echo $line | cut -d '|' -f1) | |
username=$(echo $line | cut -d '|' -f2) | |
appname=$(echo $line | cut -d '|' -f3) | |
# get all the access tokens for the consumer key |
#!/bin/bash | |
prev_consumer_key="" | |
prev_access_token="" | |
prev_username="" | |
prev_appname="" | |
total_count=0 | |
# start looping |