Skip to content

Instantly share code, notes, and snippets.

View sjha4's full-sized avatar

Samir Jha sjha4

View GitHub Profile
@sjha4
sjha4 / test_upload.rb
Created July 8, 2019 19:31
Steps to test content upload error
require 'pulpcore_client'
PulpcoreClient.configure do |config|
config.host= "http://localhost:24817"
config.username= 'admin'
config.password= 'password'
config.debugging=true
end
uploads_api = PulpcoreClient::UploadsApi.new
public static ArrayList<Integer> getPerfectSquares(int n)
{
ArrayList<Integer> perfectSquares = new ArrayList<>();
int current = 1, i = 1;
while (current <= n) {
perfectSquares.add(current);
current = (int)Math.pow(++i, 2);
}
return perfectSquares;
}
webpack_dev_server true in config/settings.yaml
BIND=0.0.0.0 ./node_modules/.bin/webpack-dev-server --watch-poll 1000 --disable-host-check --config config/webpack.config.js $WEBPACK_OPTS
bundle exec puma -b 'tcp://0.0.0.0' -p 3000
@sjha4
sjha4 / settings file
Created August 8, 2019 14:57
/etc/pulp/settings.py
SECRET_KEY = "secret"
ANSIBLE_API_HOSTNAME = "http://localhost:24817"
CONTENT_HOST = "ansible-demo.samir.example.com"
ANSIBLE_CONTENT_HOSTNAME = "http://localhost:24816/pulp/content"
DATABASES = {"default": {"ENGINE": "django.db.backends.postgresql_psycopg2", "HOST": "localhost", "NAME": "pulp", "PASSWORD": "pulp", "PORT": 7878, "USER": "pulp"}}
@sjha4
sjha4 / Pulp3 - Hammer Uploads
Created August 21, 2019 13:37
Pulp3 - Hammer Uploads
1. Do we want hammer to know if it's going to be a pulp2 vs pulp3 upload?
2. Different params needed for:
a) create_upload: Pulp2 expects no params while pulp3 expects size.
Send it for both from hammer and update runcible to ignore this param?
b) update_upload: Also needs total_size to form content_range "bytes #{start}-#{finish}/#{total}"
@sjha4
sjha4 / db:seed
Created September 12, 2019 15:08
Seeding /home/vagrant/foreman_ansible/db/seeds.d/75_job_templates.rb
2019-09-12T15:07:05 [D|app|] setting attributes for Ansible Roles - Ansible Default with id: 143
2019-09-12T15:07:05 [D|app|] setting attributes for Ansible Roles - Install from Galaxy with id: 144
2019-09-12T15:07:05 [D|app|] setting attributes for Ansible Roles - Install from git with id: 145
2019-09-12T15:07:05 [D|app|] setting attributes for Ansible - Run insights maintenance plan with id: 146
2019-09-12T15:07:05 [D|app|] setting attributes for Module Action - Ansible Default with id: 147
2019-09-12T15:07:05 [D|app|] setting attributes for Package Action - Ansible Default with id: 148
2019-09-12T15:07:05 [D|app|] setting attributes for Power Action - Ansible Default with id: 149
2019-09-12T15:07:06 [D|app|] setting attributes for Puppet Run Once - Ansible Default with id: 150
2019-09-12T15:07:06 [D|app|] setting attributes for Run Command - Ansible Default with id: 151
architecture_id
architecture_name
build
capabilities
certname
comment
compute_profile_id
compute_profile_name
compute_resource_id
compute_resource_name
@sjha4
sjha4 / ktest-live
Created September 18, 2019 20:06
#!/usr/bin/env sh
KATELLO_PATH=/home/vagrant/katello
if [[ -n $1 ]]
then
RAKE_PATH=`bundle show rake`
mode=all ruby -I"lib:test:${KATELLO_PATH}/test:${KATELLO_PATH}/spec" -I"${RAKE_PATH}/lib" $@
else
mode=all bundle exec rake test:katello
/home/sajha/mnt1/foreman/webpack/assets/javascripts/react_app/common/I18n.js
Line 35:
const timezoneAttr = Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC';
systemctl list-units -t service --full | grep pulpcore-worker