Skip to content

Instantly share code, notes, and snippets.

View alagalah's full-sized avatar

Alagalah (Keith Burns) alagalah

View GitHub Profile
#!/usr/bin/env python3
import requests
import json
import time
import sys
from requests.api import head
def pf_get_header(login_payload):
# alagalah @ thing2 in /git/personal/fdio [7:39:05]
$ git clone "ssh://alagalah@gerrit.fd.io:29418/vpp" && scp -p -P 29418 alagalah@gerrit.fd.io:hooks/commit-msg "vpp/.git/hooks/"
Cloning into 'vpp'...
remote: Counting objects: 89, done
remote: Total 107349 (delta 0), reused 107349 (delta 0)
Receiving objects: 100% (107349/107349), 140.48 MiB | 20.34 MiB/s, done.
Resolving deltas: 100% (54029/54029), done.
commit-msg 100% 1790 46.2KB/s 00:00
# alagalah @ thing2 in /git/personal/fdio [7:39:19]
/*
* PacketFabric API
*
* Use [/v2/auth/login](#/Authorization/login) endpoint to get the token. Use that token and \"Authorize\" button to authenticate your requests. You can also use that token to authorize your `curl` request: ``` curl -X GET \"https://api-beta.packetfabric.com/v2/activity-logs\" -H \"accept: *_/_*\" -H \"Authorization: Bearer 12a30d30-20c0-4f62-a982-eb1424631094\" ``` Python code to authenticate and utilize the [Bearer token](https://swagger.io/docs/specification/authentication/bearer-authentication/): ``` import requests login_url = 'https://api-beta.packetfabric.com/v2/auth/login' login_payload = { 'login': 'admin', 'password': 'p4ssw0rd' } r = requests.post(login_url, json=login_payload) auth_token = r.json()['token'] request_header = { 'Authorization': f'Bearer {auth_token}' } contacts_url = 'https://api-beta.packetfabric.com/v2/contacts' r = requests.get(contacts_url, headers=request_headerpl ```
*
* API version: 2.0.0
* Generated by: OpenAPI Generator (http
$ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
-i https://api-beta.dev.packetfabric.net/openapi/specification/swagger.yaml \
-g go \
-o /local/out/go
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 1, Warning count: 0
Errors:
-attribute paths.'/v2/ports/{port_circuit_id}/upgrade'(post).requestBody.content.'application/json'.schema.required is not of type `array`
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:533)
[{"vc_id":27541,"customer_id":23,"user_id":1767,"object_id":1145445,"state":"Active","product_id":3,"product_name":"PacketCOR","vc_circuit_id":"PF-CC-DAL-PDX-1145445","vc_multipoint":false,"vc_mode":"evpl","vc_variant":"v2","vc_service_class":"longhaul","vc_attr":{"pc_id":1998,"tasks":{"logical_interface_create_src":57431,"logical_interface_create_dest":57432},"errors":[],"billing":{"products":[]},"settings":{"ifd_id_src":255,"add_billing":false,"ifd_id_dest":3393,"vlan_id_src":211,"untagged_src":false,"vlan_id_dest":1011,"rate_limit_in":1000,"untagged_dest":false,"rate_limit_out":1000},"components":{"ifl_id_src":177917,"ifl_id_dest":177918}},"billing_products":null,"description":"HotROD - Keith","time_created":"2020-07-21T13:58:38-07:00","time_updated":"2020-07-21T13:58:54-07:00","members":[{"vc_member_id":8060,"vc_id":27541,"customer_id":23,"vc_member_name":"The VTC Group","vc_member_admin":true,"vc_member_is_source":true,"time_created":"2020-07-21T13:58:38-07:00","time_updated":"2020-07-21T13:58:38-07:00"}
diff --git a/examples/hotrod/cmd/customer.go b/examples/hotrod/cmd/customer.go
index ebdc5a7..9603438 100644
--- a/examples/hotrod/cmd/customer.go
+++ b/examples/hotrod/cmd/customer.go
@@ -36,7 +36,7 @@ var customerCmd = &cobra.Command{
zapLogger := logger.With(zap.String("service", "customer"))
logger := log.NewFactory(zapLogger)
server := customer.NewServer(
- net.JoinHostPort("0.0.0.0", strconv.Itoa(customerPort)),
+ net.JoinHostPort(customerAddr, strconv.Itoa(customerPort)),
#!/bin/bash
# Create the Environment variables needed during Bifocals iteration
# Login to 1P(assword)
eval $(op signin my)
# Fetch the env-vars from 1P
ev=`op get item "bifocals"`
#!/usr/bin/env bash
##
# Expects things to look like:
#. . <--- WORK
#. ├── datacollector
#. ├── datacollector-docker
WORK="${WORK:-$(PWD)}"
* 9758c8a5e1 - Updated master version to 3.14.0-SNAPSHOT (9 days ago) <sunayana>
* fc939079a6 - SDC-13152. Max memory sent by SDC is incorrect (10 days ago) <Shrijit Pillai>
* 4208efb869 - SDC-12704. Abillity to handle the null special case in Salesforce for SOAP API (10 days ago) <Pat Patterson>
* fa60b06cdd - SDC-13126. datacollector.test_classpath.test_classpath failing for stagelib - cdh_6_3-lib (10 days ago) <Karthik Iyer>
* d1a318b8a2 - SDC-13084. Bulk start of huge no of pipelines can cause SDC to miss sending heartbeats to SCH (12 days ago) <Virag Kothari>
* 25cbb095b3 - SDC-13114. Split azure-keyvault-credentialstore-lib into 2 modules protolib and lib (12 days ago) <Madhukar>
* e91bffcc36 - SDC-12573. classpath for hdp 3_1 (13 days ago) <Toni>
* 3bdc6b95c9 - SDC-12845. Websocket Client - Error sending resource (2 weeks ago) <Hugo Prol>
* 5a87eba3db - SDC-13117. Polymorphic External ID Reference Fails with FORCE_13 (2 weeks ago) <Pat Patterson>
* 2630603cf3 - SDC-13093. Several stages cannot run wit
fullnameOverride: sch
image:
repository: gcr.io/streamsets-engineering/control-hub
tag: aetna
pullSecret: myregistrykey
pullPolicy: IfNotPresent
ingress:
proto: http
domain: microk8s.local
host: sch