Ubuntu Pastebin

Paste from Michael Foord at Tue, 10 Mar 2015 15:10:54 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
                } else if ciid, cerr := container.InstanceId(); cerr != nil {   
                        result.Results[i].Error = common.ServerError(cerr)      
                        continue                                                
                }                                                               
                                                                                
                var doc struct {                                                
                        Address string                                          
                }                                                               
                iter := addresses.Find(bson.D{{"machineid", ciid}}).Iter()      
                for iter.Next(&doc) {                                           
                        addr, _ := p.st.IPAddress(doc.Address)                  
                        addr.Remove()                                           
                }                                                               
                if err := iter.Close(); err != nil {                            
                        result.Results[i].Error = common.ServerError(err)       
                        continue                                                
                }    
Download as text