Skip to content

Instantly share code, notes, and snippets.

View stulevine's full-sized avatar

Stu Levine stulevine

  • @wildcatproductions.com
  • Auburn Hills, MI
  • 04:50 (UTC -04:00)
View GitHub Profile
$result = $this->uber->call(
'device.module_call',
array(
'device_id'=>$vip['device_id'],
'module_id'=>'virtualip',
'function'=>'edit',
array(
'editclick'=>1,
'loadbalancer'=>$lb_server,
'vip'=>$vserver_name
<?php
/**
* A soap _client_ for accessing other apis
*
*/
namespace soap;
class Soap extends \core\LibBase {
function device_is_voxserver_compat($dev, $allow_custom = false)
{
if($dev['devtype_group_id'] != VOXSERVERS_DEVICE_GROUP_ID)
return false;
if($allow_custom)
return true;
$dev_config_id = $dev['metadata']['voxserver_sellable_config'];
//make sure $this->configs s initialize
// grab report from device(s) using dm_virtualip module
$req = array(
'device_module' => 'dm_virtualip',
'function' => 'report',
'type' => 'loadbalancer',
'device' => $device,
'loadbalancer' => 'stingray.dev.voxel.net',
'virtualip' => '7925-4119-vserver',
'start' => $request['start'],
'end' => $request['end'],
10:03 [voxel] -!- #voxdev dcoe H 0 ~DCoe@dhcp-63-251-67-187.acs.internap.com [David Coe]
10:03 [voxel] -!- #voxdev jamesc G 0 ~Adium@dhcp-63-251-67-109.acs.internap.com [Adium User]
10:03 [voxel] -!- #voxdev jkr H 0 ~jkr@c-98-252-242-51.hsd1.ga.comcast.net [Jay K. Robertson]
10:03 [voxel] -!- #voxdev Corey H 0 ~Adium@nat-loopback.lga4.us.corp.voxel.net [Adium User]
10:03 [voxel] -!- #voxdev zac H@ 0 ~zac@api2.dev.voxel.net [zac]
10:03 [voxel] -!- #voxdev josh_spice H 0 ~Adium@nat-loopback.lga4.us.corp.voxel.net [Adium User]
10:03 [voxel] -!- #voxdev daisy H 0 ~daisy@shuffman-linux.acs.internap.com [Daisy Beckenbach]
10:03 [voxel] -!- #voxdev vetere H@ 0 ecv@postmeta.net [blue bell knoll]
10:03 [voxel] -!- #voxdev gdeforest H 0 ~Adium@nat-loopback.lga4.us.corp.voxel.net [Adium User]
10:03 [voxel] -!- #voxdev pdowell_home H@ 0 ~pdowell@pool-71-167-144-49.nycmny.fios.verizon.net [Patrick Dowell]
(api2):slevine> hapi files.objects.create customer_id=7614 container=stusworldofstuff object=stuobject
{
"response" : {
"status" : "ok",
"http_request" : {
"headers" : [
{
"X-Auth-Token" : "e01b4d573a52424c84c599c2408a0a54"
}
],
{
"sites": [
{
"stageVersion": 0,
"isDefault": true,
"id": 20448,
"operationalStatus": "ENABLED",
"name": "HTTPS Path Match Site",
"serviceType": {
"allowPublish": true,
$duse = $cdn->reseller_api->GetDiskUsageForDomain(
array(
'domainID'=>23467,
'rangeStart'=>'2013-05-29T00:00:00Z',
'rangeEnd'=>'2013-05-31T00:00:00Z')
);
apish> pexport($duse);
array (
@stulevine
stulevine / gist:6282415
Created August 20, 2013 14:51
ptables additions to lbaas1.lga11 for hAPI prod api communications
Now fixed via NJ Router ACL additions this morning and my iptables lbaas1 additions below (lbaas2 & 3 need these as well):
root@lbaas1.lga11 /home/slevine # iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -s 74.63.39.138/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s 192.170.149.250/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s 173.231.130.227/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s 74.201.59.61/32 -d 192.170.150.66/32 -p tcp -m tcp --dport 80 -j ACCEPT
@stulevine
stulevine / gist:6297158
Created August 21, 2013 17:06
original iptables
root@uberdev.ldj1 /home/slevine # iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -s 74.63.39.138/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s 192.170.149.250/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s 173.231.130.227/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s 208.122.10.36/32 -p tcp -m tcp --dport 22 -j ACCEPT