Skip to content

Instantly share code, notes, and snippets.

public class MyBehaviourPolicy implements NodeServicePolicies.OnCreateChildAssociationPolicy {
private PolicyComponent policyComponent;
public PolicyComponent getPolicyComponent() {
return policyComponent;
}
public void setPolicyComponent(PolicyComponent policyComponent) {
this.policyComponent = policyComponent;
}
@alex4u2nv
alex4u2nv / cloned-vm-update-network
Last active December 31, 2015 09:29
Update the network interface for a cloned linux virtual machine
ifconfig eth1 up && eth1=`ifconfig | grep eth1 | sed 's/.*HWaddr //g'` && cat /etc/sysconfig/network-scripts/ifcfg-eth0 | sed "s/HWADDR.*/HWADDR=$eth1/" | sed "s/eth0/eth1/g" > /etc/sysconfig/network-scripts/ifcfg-eth1 && rm /etc/sysconfig/network-scripts/ifcfg-eth0 && service network restart
package com.swazzy.viewresolver;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mobile.device.Device;