krissaxton / spoke Goto Github PK
View Code? Open in Web Editor NEWSpoke: a collection of python libraries for ISPs, ASPs and cloud providers.
License: Other
Spoke: a collection of python libraries for ISPs, ASPs and cloud providers.
License: Other
When run via salt:
opt/pkg/salt/bin/salt -c /opt/pkg/salt/etc/master 'dhcp01.aethernet.local' dhcp.reservation_create freesme-231 01-02-00-02-31-00-00 10.0.16.98
{'dhcp01.aethernet.local': {'count': 1,
'data': [['cn=freesme-231,cn=group1,cn=dhcp01-config,ou=dhcp,ou=services,o=aethernet,c=gb',
{'cn': ['freesme-231'],
'dhcpHWAddress': ['ethernet -34'],
'dhcpOption': ['host-name "freesme-231"'],
'dhcpStatements': ['fixed-address 10.0.16.98'],
'objectClass': ['top',
'dhcpHost',
'dhcpOptions']}]],
'exit_code': 0,
'msg': 'Found spoke.lib.dhcp:',
'type': 'spoke.lib.dhcp'}}
dhcpHWAddress has value ethernet -34 instead of mac address.
Add a new LDAP attribute to record the OS type of the host (currently would not be able to determine this in case of a rebuild).
Searching for a dhcp server entry where a DHCP reservation exists with the same name will return both entries (only the server entry should be returned).
#spoke-dhcp -ES dhcp01
Bound to LDAP server openldap01:389 as uid=admin,o=aethernet,c=gb
'msg': 'Found 2 spoke.lib.dhcps:'}
Found 2 spoke.lib.dhcps:
[('cn=dhcp01,ou=dhcp,ou=services,o=aethernet,c=gb', {'objectClass': ['top', 'dhcpServer'], 'dhcpServiceDN': ['cn=dhcp01-config,ou=dhcp,ou=services,o=aethernet,c=gb'], 'cn': ['dhcp01']}), ('cn=dhcp01,cn=group1,cn=dhcp01-config,ou=dhcp,ou=services,o=aethernet,c=gb', {'objectClass': ['top', 'dhcpHost', 'dhcpOptions'], 'dhcpStatements': ['fixed-address 10.0.62.3'], 'dhcpOption': ['host-name "dhcp01"'], 'cn': ['dhcp01'], 'dhcpHWAddress': ['ethernet 00:16:3e:ca:00:00']})]
Probably just need a short sleep before testing for power status
#salt -c /opt/pkg/salt/etc/master 'xen03.aethernet.local' vm.power_delete freesme-230
{'xen03.aethernet.local': {'exit_code': 6,
'msg': 'ValidationError: Power operation returned OK, but On state is On'}}
#salt -c /opt/pkg/salt/etc/master 'xen03.aethernet.local' vm.power_search freesme-230
{'xen03.aethernet.local': {'count': 1,
'data': [{'state': 'Off',
'vm_name': 'freesme-230'}],
'exit_code': 0,
'msg': 'Found VM:',
'type': 'VM'}}
vm_storage create method should allow passing of OS type. User-land supporting utilities (spoke-vm and salt module vm) should have similar support.
It should be possible for utilities using the spoke lvm library (e.g. command line utilites or mcollective plugins) to retreive a default volume group from spoke.conf. This way, only a logical volume name and size need to be passed during create operations. Spoke config would be different for each host machine, allowing for variations in volume group names accross machines.
$ ./spoke-host -US
Sorry, something went wrong, you shouldn't be seeing this:
_get_object() got an unexpected keyword argument 'attrs_only'
e.g.
try:
self.ca_def_duration = self.config.get('CA', 'ca_def_duration')
except:
self.ca_def_duration = 1095
becomes:
self.ca_def_duration = self.config.get('CA', 'ca_def_duration', 1095)
Since we moved to using files instead of links for pxelinux config, the delete method fails:
#spoke-tftp -TC 02:00:02:30:00:00 xendomu.template
Created TFTP config:
[['01-02-00-02-30-00-00']]
#spoke-tftp -TD 02:00:02:30:00:00
Link to mac 02:00:02:30:00:00 doesn't exist, can't delete
Currently mcollective agents are (de)activated based on a value in the mcollective configuration file. This method requires a restart of the mcollective daemon for the change to take effect. A more dynamic approach would be for the agent to check for the presence of file each time it is called and only run when the file is present. The presence of this file would be controller via puppet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.