Skip to content

Instantly share code, notes, and snippets.

# NoTags.py
# ansible-lint rule to mark all tags as errors
from __future__ import absolute_import
from ansiblelint import AnsibleLintRule
class NoTags(AnsibleLintRule):
id = "ONF0001"
shortdesc = "Don't use tags to modify runtime behavior"
lf/global-jjb/shell $ git review
remote: error: branch refs/publish/master/jobcosterrorhandling:
remote: You need 'Create' rights to create new references.
remote: User: zdw
remote: Contact an administrator to fix the permissions
remote: Processing changes: refs: 1, done
To ssh://gerrit.linuxfoundation.org:29418/releng/global-jjb.git
! [remote rejected] HEAD -> refs/publish/master/jobcosterrorhandling (prohibited by Gerrit: not permitted: create)
error: failed to push some refs to 'ssh://zdw@gerrit.linuxfoundation.org:29418/releng/global-jjb.git'
@zdw
zdw / openolt-bal30-dev_voltha-protos-master.diff
Created July 30, 2019 21:06
Diff between .protos in openolt (multiple branches) and voltha-protos (master) repos
--- protos/openolt.proto 2019-07-30 10:46:57.000000000 -0700
+++ ../voltha-protos/protos/voltha_protos/openolt.proto 2019-07-30 10:45:53.000000000 -0700
@@ -13,9 +13,12 @@
// limitations under the License.
syntax = "proto3";
+
+option go_package = "github.com/opencord/voltha-protos/go/openolt";
+
package openolt;
@zdw
zdw / dej2lint.py
Created April 19, 2019 23:32
Runs yamllint against a jinja2 templated YAML file
#!/usr/bin/env python
# dej2lint - remove jinja2 directives for lint checking
# also should try to fix line nums in lint output
# currently only runs on yaml files with yamllint
import sys
import re
from yamllint import linter
from yamllint.config import YamlLintConfig
# --- defaults for http auth ---
docker_registry_htpaswd_realm: "CORD Registry"
docker_registry_admin_user: "dockerreg@opencord.org"
docker_registry_admin_pass: "{{ lookup('password', credentials_dir ~ '/' ~ docker_registry_admin_user ~ ' chars=ascii_letters,digits,length=16') }}"
# see https://docs.docker.com/registry/recipes/mirror/
# docker_registry_proxy_remoteurl: "https://registry-1.docker.io"
vagrant@head1:/var/log/maas$ sudo apt-get install shim-signed
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
efibootmgr grub-common grub-efi-amd64-bin grub-pc grub-pc-bin grub2-common
libefivar0 mokutil sbsigntool secureboot-db shim
Suggested packages:
multiboot-doc grub-emu xorriso desktop-base
The following NEW packages will be installed:
2017-08-29 06:17:23+0000 [-] Log opened.
2017-08-29 06:17:23+0000 [-] twistd 13.2.0 (/usr/bin/python 2.7.6) starting up.
2017-08-29 06:17:23+0000 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2017-08-29 06:17:23+0000 [-] Site starting on 5248
2017-08-29 06:17:23+0000 [-] set uid/gid 116/122
2017-08-29 06:17:23+0000 [-] TFTP starting on 69
2017-08-29 06:17:23+0000 [-] Starting protocol <tftp.protocol.TFTP instance at 0x7f7e5f9d61b8>
2017-08-29 06:17:23+0000 [-] TFTP Listener started at 10.100.198.201:69
2017-08-29 06:17:23+0000 [-] TFTP starting on 69
2017-08-29 06:17:23+0000 [-] Starting protocol <tftp.protocol.TFTP instance at 0x7f7e5f9d6560>
@zdw
zdw / gist:064fa5c2eea2dbfb3747fd6fdcd8bd23
Last active August 29, 2017 14:58
maas keeps downloading snapshots
vagrant@head1:/var/lib/maas/boot-resources$ dpkg -l maas
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================-===================-===================-================================================================
ii maas 1.9.5+bzr4599-0ubun all MAAS server all-in-one metapackage
vagrant@head1:/var/lib/maas/boot-resources$ ls
cache snapshot-20170829-080223 snapshot-20170829-094723 snapshot-20170829-113223 snapshot-20170829-131737
snapshot-20170829-062010 snapshot-20170829-080723 snapshot-20170829-095223 snapshot-20170829-113723 snapshot-20170829-132223
#!/usr/bin/env bash
MS_CERT_PATH="/opt/ms"
MS_URL="http://ms:8080"
ADMIN_EMAIL="syndicate-ms@example.com"
USER_EMAIL="user@example.com"
VOLUME_NAME="test_vol"
VOLUME_DESCRIPTION="This is a test volume"
### Keybase proof
I hereby claim:
* I am zdw on github.
* I am zdw (https://keybase.io/zdw) on keybase.
* I have a public key whose fingerprint is 2238 38C1 3F05 3211 3631 557E BA03 5DA2 17E4 CB61
To claim this, I am signing this object: